package com.miaoxie.forum.module.framework.server.controller;

import com.miaoxie.forum.module.auth.shared.controller.ResponseMessageController;
import com.miaoxie.forum.module.auth.shared.json.JSON;
import com.miaoxie.forum.module.auth.shared.security.SecurityNonCheckRequired;
import com.miaoxie.forum.module.framework.server.services.IWebIMService;
import com.miaoxie.forum.module.framework.shared.entity.Users;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * Created by miaoxie on 2017/2/21.啊啊啊
 * webIm接口
 */
@Controller
@RequestMapping("/monitor/bi")
@SecurityNonCheckRequired
public class WebIMContorller extends ResponseMessageController {
    @Autowired
    IWebIMService webIMService;
    @RequestMapping("/login")
    @ResponseBody
    @JSON
    public Map<String, Object> login(String qq,String username,String pwd) throws ParseException {
        Users users = webIMService.login(qq,username,pwd);
        this.getMap().put("users", users);
        return this.returnSuccess();
    }

}
